<div class="box box-primary">
    <div class="">
        <br/>

        <div class="box box-solid">
            <div class="box-body">
                <?php echo form_open(admin_url('manageResolutions/index'), 'method="get" class=""'); ?>
                <div class="row">
                    <div class="col-md-10">

                        <div class="row">
                            <?php $row_ = 'col-xs-12 col-sm-6 col-md-3'; ?>
                            <div class="<?php echo $row_; ?>">
                                <div class="form-group">
                                    <label for="resolution_name">关键词</label>
                                    <input id="resolution_name" type="text" class="form-control input-sm"
                                           value="<?php echo($this->input->get('resolution_name')); ?>"
                                           name="resolution_name"></div>
                            </div>
                            <div class="<?php echo $row_; ?>">
                                <div class="form-group">
                                    <label for="status">状态</label>
                                    <?php echo form_dropdown('status', array('' => '选择') + $status, (isset($_GET['status']) ? $_GET['status'] : ''), 'class="form-control input-sm" id="status"'); ?>
                                </div>
                            </div>
                            <div class="<?php echo $row_; ?>">
                                <div class="form-group">
                                    <label for="status">分类状态</label>
                                    <?php echo form_dropdown('status_rg', array('' => '选择') + $status_rg, (isset($_GET['status']) ? $_GET['status'] : ''), 'class="form-control input-sm" id="status"'); ?>
                                </div>
                            </div>


                        </div>

                    </div>
                    <div class="col-md-2">
                        <div class="pull-right">
                            <button type="submit" class="btn btn-primary btn-sm">
                                搜索
                            </button>
                            <a href="<?php echo admin_url('manageResolutions'); ?>"
                               class="btn btn-info btn-sm">取消</a>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                </div>

                <?php echo form_close(); ?>
            </div>
        </div>
    </div>
    <?php if ($resolutions) { ?>
        <?php echo form_open(admin_url('manageResolutions/delete_bulk/' . $offset)); ?>
        <div class="box-body">
            <div>
                <div class="pull-left">
                    <a class="btn btn-primary" href="<?php echo admin_url('manageResolutions/add/') ?>">添加壁纸分辨率</a>
                    <button onclick="return confirm('Are you sure you want to Delete? these Resolutions')" type="submit"
                            name="delete_bulk" class="btn btn-danger">删除分辨率
                    </button>
                </div>
                <div class="pull-right ul_no_m">
                    <?php echo $pagination; ?>
                </div>
            </div>
            <div class="clearfix"></div>
            <br/>

            <table class="table table-condensed">
                <tr>
                    <th style="width: 20px"><input type="checkbox" id="check-all"></th>
                    <th style="width: 10px">#</th>
                    <th>壁纸分辨率名称</th>
                    <th>宽度</th>
                    <th>高度</th>
                    <th>比例</th>
                    <th>状态</th>
                    <th>分类</th>
                    <th>分类状态</th>
                    <th style="width: 140px"></th>
                </tr>

                <?php foreach ($resolutions as $re) { ?>
                    <tr>
                        <td class="small-col">
                            <input name="res_id[]" value="<?php echo $re->resolution_seq_id; ?>"
                                   type="checkbox">
                        </td>
                        <td><?php echo $re->resolution_seq_id; ?></td>
                        <td><?php echo $re->resolution_name; ?></td>
                        <td><?php echo $re->resolution_width; ?></td>
                        <td><?php echo $re->resolution_height; ?></td>
                        <td><?php echo join(':', getAspectRatio($re->resolution_width, $re->resolution_height)); ?></td>
                        <td><?php echo $re->resolution_status; ?></td>
                        <td>
                            <a href="<?php echo admin_url('manageResolutions/editGroup/' . $re->resolution_group_seq_id) ?>"><?php echo $re->resolution_group_name; ?></a>
                        </td>
                        <td><?php echo $re->resolution_group_status; ?></td>
                        <td>
                            <a class="btn btn-xs btn-info"
                               href="<?php echo admin_url('manageResolutions/edit/' . $re->resolution_seq_id . '/' . $offset); ?>"><span
                                    class="glyphicon glyphicon-edit"></span> 编辑</a>
                            <a class="btn btn-xs btn-danger"
                               onclick="return confirm('Are you sure you want to Delete <?php echo $re->resolution_name; ?>?')"
                               href="<?php echo admin_url('manageResolutions/delete/' . $re->resolution_seq_id . '/' . $offset); ?>"><span
                                    class="glyphicon glyphicon-remove"></span> 删除</a>
                        </td>
                    </tr>
                <?php } ?>

            </table>
        </div>
        <div class="box-footer clearfix">
            <div>
                <div class="pull-left">
                    <a class="btn btn-primary" href="<?php echo admin_url('manageResolutions/add/') ?>">添加壁纸分辨率</a>
                    <button
                        onclick="return confirm('Are you sure you want to Delete? these Resolutions')"
                        type="submit"
                        name="delete_bulk" class="btn btn-danger">删除分辨率
                    </button>
                </div>
                <div class="pull-right ul_no_m">
                    <?php echo $pagination; ?>
                </div>
            </div>
        </div>
        <?php echo form_close(); ?>
    <?php } else { ?>
        <div class="callout callout-warning">
            <h4>还没有任何壁纸分辨率!</h4>

            <p>还没有任何壁纸分辨率!你可以点击 <a href="<?php echo admin_url('manageResolutions/add'); ?>">这里</a>添加.</p>
        </div>
    <?php } ?>
</div>